package fr.labri.buganalyzer.model;

import java.sql.Timestamp;

public class Change {

	private long id;
	private Issue issue;
	private String field;
	private String oldValue;
	private String newValue;
	private Developer changedBy;
	private Timestamp changedOn;
	
	public Change() {
	}

	public long getId() {
		return id;
	}

	public Issue getIssue() {
		return issue;
	}

	public String getField() {
		return field;
	}

	public String getOldValue() {
		return oldValue;
	}

	public String getNewValue() {
		return newValue;
	}

	public Developer getChangedBy() {
		return changedBy;
	}

	public Timestamp getChangedOn() {
		return changedOn;
	}

	public void setId(long id) {
		this.id = id;
	}

	public void setIssue(Issue issue) {
		this.issue = issue;
	}

	public void setField(String field) {
		this.field = field;
	}

	public void setOldValue(String oldValue) {
		this.oldValue = oldValue;
	}

	public void setNewValue(String newValue) {
		this.newValue = newValue;
	}

	public void setChangedBy(Developer changedBy) {
		this.changedBy = changedBy;
	}

	public void setChangedOn(Timestamp changedOn) {
		this.changedOn = changedOn;
	}
	
	@Override
	public String toString(){
		return "Change by " + changedBy.getAlias() + " at " + changedOn + ": " + field + " " + oldValue+" --> "+ newValue;
	}

}
